package com.sun.demo.job;


import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;
import java.util.Date;

@Slf4j
@Component
public class Job01 implements Job {
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        String date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
        log.info(Thread.currentThread().getName() + "执行任务" + date);
    }
}
